package com.qf.sportsevent.entity;

import android.content.Context;
import android.content.Intent;
import android.text.TextUtils;

import com.qf.sportsevent.activity.NewsDetailActivity;
import com.qf.sportsevent.activity.WebActivity;

import java.util.List;

/**
 * Created by Administrator on 2016/12/15.
 */

public class NewsContentsEntity {
    private int id;
    private String title;
    private String image;
    private List<String> images;
    private int image_type;
    private int content_type;
    private int video_type;
    private String video_link;
    private int show_type;
    private int label;
    private String label_name;
    private int note_num;
    private NewsTopsUserEntity user;
    private String source_link;
    private boolean isTop;

    private int dashboard_id;
    private int dashboard_data;
    private String update_time;
    private List<String> text_images;
    private String text_content;
    private boolean isDetail;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public List<String> getImages() {
        return images;
    }

    public void setImages(List<String> images) {
        this.images = images;
    }

    public int getImage_type() {
        return image_type;
    }

    public void setImage_type(int image_type) {
        this.image_type = image_type;
    }

    public int getContent_type() {
        return content_type;
    }

    public void setContent_type(int content_type) {
        this.content_type = content_type;
    }

    public int getVideo_type() {
        return video_type;
    }

    public void setVideo_type(int video_type) {
        this.video_type = video_type;
    }

    public String getVideo_link() {
        return video_link;
    }

    public void setVideo_link(String video_link) {
        this.video_link = video_link;
    }

    public int getShow_type() {
        return show_type;
    }

    public void setShow_type(int show_type) {
        this.show_type = show_type;
    }

    public int getLabel() {
        return label;
    }

    public void setLabel(int label) {
        this.label = label;
    }

    public String getLabel_name() {
        return label_name;
    }

    public void setLabel_name(String label_name) {
        this.label_name = label_name;
    }

    public int getNote_num() {
        return note_num;
    }

    public void setNote_num(int note_num) {
        this.note_num = note_num;
    }

    public NewsTopsUserEntity getUser() {
        return user;
    }

    public void setUser(NewsTopsUserEntity user) {
        this.user = user;
    }

    public String getSource_link() {
        return source_link;
    }

    public void setSource_link(String source_link) {
        this.source_link = source_link;
    }

    public boolean isTop() {
        return isTop;
    }

    public void setTop(boolean top) {
        isTop = top;
    }

    public String getUpdate_time() {
        return update_time;
    }

    public void setUpdate_time(String update_time) {
        this.update_time = update_time;
    }

    public List<String> getText_images() {
        return text_images;
    }

    public void setText_images(List<String> text_images) {
        this.text_images = text_images;
    }

    public String getText_content() {
        return text_content;
    }

    public void setText_content(String text_content) {
        this.text_content = text_content;
    }

    public int getDashboard_id() {
        return dashboard_id;
    }

    public void setDashboard_id(int dashboard_id) {
        this.dashboard_id = dashboard_id;
    }

    public int getDashboard_data() {
        return dashboard_data;
    }

    public void setDashboard_data(int dashboard_data) {
        this.dashboard_data = dashboard_data;
    }

    public boolean isDetail() {
        return isDetail;
    }

    public void setDetail(boolean detail) {
        isDetail = detail;
    }

    public void click(Context context){
        Intent intent = new Intent(context, NewsDetailActivity.class);
        intent.putExtra("id",id);
        intent.putExtra("dashboard_id",dashboard_id);
        intent.putExtra("dashboard_data",dashboard_data);
        context.startActivity(intent);
    }

    public void clickVideo(Context context){
        if(video_link!=null&&!TextUtils.isEmpty(video_link)) {
            Intent intent = new Intent(context, WebActivity.class);
            intent.putExtra("video", video_link);
            context.startActivity(intent);
        }
    }
}




